package com.vsen.lpr.common.exception;

/**
 * @author yy
 * @Type BusinessException.java
 * @Desc
 * @date 2020/8/17
 */
public class BusinessException extends RuntimeException implements IError {

    String errorCode;
    String errorMsg;


    public BusinessException(IError iError) {
        this.errorCode = iError.getErrorCode();
        this.errorMsg = iError.getErrorMsg();
    }

    public BusinessException(String errorCode, String errorMsg) {
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
    }

    @Override
    public String getErrorCode() {
        return this.errorCode;
    }

    @Override
    public String getErrorMsg() {
        return this.errorMsg;
    }
}
